package com.ykg.service.impl;

import com.ykg.mapper.GoodsMapper;
import com.ykg.pojo.Goods;
import com.ykg.request.ChangePriceRequest;
import com.ykg.service.IGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 类(接口)：
 * Created on 2021/6/24 16:37.
 * Author: zetong
 * Description:
 */
@Service
public class GoodsServiceImpl implements IGoodsService {
    @Autowired
    private GoodsMapper goodsMapper;


    @Override//获取货品信息
    public Goods getGoodsPrice(){
        Goods goods = goodsMapper.findAll();
        return goods;
    }
    @Override//更改货物价格
    public int changePrice(ChangePriceRequest changePriceRequest){
        int result = goodsMapper.updatePrice(changePriceRequest.getTid(),changePriceRequest.getPrice());
        return result;
    }
}
